package com.dao;

import com.domain.Question;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.*;

@Repository
public interface QuestionDao {

    @Select("SELECT * FROM question")
    public List<Question> findAllQuestion();

    @Insert("INSERT INTO question(title,text,userid) VALUES (#{title},#{text},#{userid})")
    public Integer addOneQuestion(Question question);
}
